/**
 * Created by ruiyuan on 15-9-4.
 */
module.exports = function (app) {

    var mutualAid = require('../controllers/mutualAid-controller');
    var tokenFilter = require('../filters/token-filter');

    app.all('/rest/' + RESTFullServiceVersion + '/mutualAid/*', tokenFilter.doCheckToken);

    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/all/list/:ts/:token/:deviceId', mutualAid.getMutualAllList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/question/list/:ts/:token/:deviceId', mutualAid.getQuestionList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/share/list/:ts/:token/:deviceId', mutualAid.getShareList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/talk/list/:ts/:token/:deviceId', mutualAid.getTalkList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/essence/list/:ts/:token/:deviceId', mutualAid.getEssenceList);

    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/reply/list/:id/:ts/:token/:deviceId', mutualAid.getReplyList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/myAdoptReply/list/:ts/:token/:deviceId', mutualAid.getMyAdoptReplyList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/myReply/list/:ts/:token/:deviceId', mutualAid.getMyReplyList);

    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/myReply/list/:ts/:token/:deviceId', mutualAid.getMyReplyList);

    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/tables/:deviceId', mutualAid.getMutualAidTables);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/pageData/:ts/:deviceId', mutualAid.getMutualAidPageData);

    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxPageData/:ts/:deviceId', mutualAid.getWXCommunityMsgList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxMyPageData/:ts/:deviceId', mutualAid.getWXMyCommunityMsgList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxJournals/:ts/:deviceId', mutualAid.getWXJournalsList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxJournals/notification/:ts/:deviceId', mutualAid.getJournalsNotification);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxJournals/notification/user/:ts/:deviceId', mutualAid.getJournalsUserNotification);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxJournals/notification/community/:ts/:deviceId', mutualAid.getJournalsCommunityNotification);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxJournals/myMessages/:ts/:token/:deviceId', mutualAid.getMyMessageList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxJournals/pics/:ts/:deviceId', mutualAid.getJournalsPics);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxMyJournals/:ts/:deviceId', mutualAid.getWXMyJournalsList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxReply/list/:id/:ts/:token/:deviceId', mutualAid.getWXReplyList);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxSnapshotUpdate/:ts/:deviceId', mutualAid.getWXSnapshotUpdate);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxMyRepliedGoods/:ts/:deviceId', mutualAid.getWXMyRepliedGoods);
    app.get('/rest/' + RESTFullServiceVersion + '/mutualAid/wxReply/listener/:id/:ts/:token/:deviceId', mutualAid.getWXReplyListener);
};
